<template>
  <div>
    <router-view />
  </div>
</template>

<script>
import { setToken } from "@/utils/storage";
import request from "@/utils/request";
export default {
  data() {
    return {};
  },

  async created() {
    const res = await request.post("/user/login", {
      username: "shuaipeng",
      password: "123456",
    });
    console.log(res);
    setToken(res.body.token);
  },
  methods: {},
};
</script>

<style scoped></style>
